package cn.knightzz.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author knightzz
 * @since 2021-05-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysEvent对象", description="")
public class SysEvent implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String title;

    private String content;

    private String address;

    // 时间格式化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date eventTime;

    @ApiModelProperty(value = "文件id列表, 以逗号分割")
    private String fileList;

    @ApiModelProperty(value = "事件上传者的id")
    private Long authorId;

    @ApiModelProperty(value = "事件处理者的id")
    private Long handleId;

    @ApiModelProperty(value = "创建时间")
    // 插入时填充数据
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    // 插入和更新时填充数据
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    // 事件上传者的姓名
    @TableField(exist = false)
    private String authorName;

    // 事件处理人的姓名
    @TableField(exist = false)
    private String handleName;

    // 事件上传的辖区
    @ApiModelProperty(value = "事件上传的辖区")
    private String area;

    // 视频地址
    @TableField(exist = false)
    private List<String> videos;
    // 图片地址列表
    @TableField(exist = false)
    private List<String> images;

    // 事件状态
    @ApiModelProperty(value = "事件上状态")
    @TableField(exist = false)
    private Long status;
}
